package com.visualexpress.datacreation;

import java.util.List;

import org.hibernate.cfg.Configuration;
import org.hibernate.tool.hbm2ddl.SchemaExport;

import com.visualexpress.count.CountAll;
import com.visualexpress.dao.SiteDAO;
import com.visualexpress.domain.Site;
import com.visualexpress.shards.HibernateSessionFactory;

public class CreateSite {
	public static void main(String[] args){
		
		Site globalSite = new Site();
		globalSite.setName("global_site");
		globalSite.setNumber("000");
		globalSite.setServer("localhost");
		new SiteDAO().save(globalSite);

		Site shSite = new Site();
		shSite.setName("sh_site");
		shSite.setNumber("001");
		shSite.setServer("localhost");
		new SiteDAO().save(shSite);
		
		Site gzSite = new Site();
		gzSite.setName("gz_site");
		gzSite.setNumber("002");
		gzSite.setServer("localhost");
		new SiteDAO().save(gzSite);

//		String id = globalSite.getId();
//		Site foundSite = new SiteDAO().findById(id);
//		new SiteDAO().save(foundSite);
//		Site site = new SiteDAO().findById("00004028d80021a10121a1665646000c");
		
//		foundSite.getName();
//		Site localSite = new Site();
//		localSite.setName("local_site");
//		localSite.setNumber("020");
//		localSite.setServer("localhost");
//		localSite.setId(globalSite.getId());
//		new SiteDAO().save(localSite);
		
		
	}
}
